﻿<h1>字段 Field</h1>
<div class="section">
    <h2>示例</h2>
    <pre class="code">
var field = new Field(form, dom, option);
</pre>
</div>
<div class="section">
    <h2>属性</h2>
    <table class="docTable">
        <tr>
            <th style="width:100px;">名称</th>
            <th style="width:100px;">类型</th>
            <th>描述</th>
        </tr>
        <tr>
            <td>name</td>
            <td>String</td>
            <td>字段name。</td>
        </tr>
    </table>
</div>
<div class="section">
    <h2>方法</h2>
    <table class="docTable">
        <tr>
            <th style="width:100px;">名称</th>
            <th style="width:150px;">参数</th>
            <th style="width:100px;">返回值</th>
            <th>描述</th>
            <th>示例</th>
        </tr>
        <tr>
            <td>setReadonly</td>
            <td>readonly: bool</td>
            <td></td>
            <td>设置只读字段。</td>
            <td></td>
        </tr>
        <tr>
            <td>clearError</td>
            <td></td>
            <td></td>
            <td>清空错误。</td>
            <td></td>
        </tr>
        <tr>
            <td>validate</td>
            <td></td>
            <td>bool</td>
            <td>验证字段。</td>
            <td></td>
        </tr>
        <tr>
            <td>getValue</td>
            <td></td>
            <td>String</td>
            <td>获取字段值。</td>
            <td></td>
        </tr>
        <tr>
            <td>setValue</td>
            <td>value: String</td>
            <td></td>
            <td>设置字段值。</td>
            <td></td>
        </tr>
    </table>
</div>